package com.gamiao.gwt.demo.useSpring.client;

import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.ClickListenerCollection;
import com.google.gwt.user.client.ui.SourcesClickEvents;
import com.google.gwt.user.client.ui.Widget;

public class UserSaveEventListenerCollection extends ClickListenerCollection
		implements ClickListener {
	private final Widget owner; 

	public UserSaveEventListenerCollection(Widget owner,
			SourcesClickEvents delegatedTo) {
		this.owner = owner;
		delegatedTo.removeClickListener(this);
		delegatedTo.addClickListener(this);
	}

	public void onClick(Widget sender) {
		super.fireClick(owner);
	}

}